package com.chixing.day05;

import com.chixing.day04.SavingAccount;

public class AccountTest {
    public static void main(String[] args) {
       SavingAccount sa1 = new SavingAccount();
       sa1.setAccNo(01);
       sa1.setAccName("hdush");

        SavingAccount sa2=new SavingAccount(0115415616464114L,"John",152463845L,456789,"4567@qq.com",2541.10,1);


//        Dog dog =  new Dog();  // this dog is a Dog
//        Animal an1 =  new Dog(); //this dog  is a Animal
//        Object o1 =  new Dog();
//
//        Animal an2 = new Animal();
//        // Dog dog2 = new Animal();  // 编译错误 complier error (syntax error)
//
//        // ClassCastException : 类转转异常
//        // Dog dog2 =(Dog) an2; // error 强制类型转换  【an2 在堆内存中 是Animal 类型】
//
//        Dog dog3 =(Dog) an1; // yes  an1 在堆中  new Dog() Dog类型
//        System.out.println(dog3 instanceof  Dog);
//        System.out.println(dog3 instanceof  Animal);




    }
}
